package com.thirteenClassicsServer.mapper;

import com.thirteenClassics.dto.CatalogQueryDTO;
import com.thirteenClassics.entity.Catalog;
import org.apache.ibatis.annotations.Delete;
import org.apache.ibatis.annotations.Mapper;

import java.util.List;

@Mapper
public interface CatalogMapper {


    void insertCatalog(Catalog catalog);

    @Delete("TRUNCATE TABLE catalog;")
    void deleteCatalog();

    @Delete("delete from catalog where contents ='' or contents is null ")
    void deleteContentIsNull();

    Long selectCatalogIdByBookName(String juanmingText);

    List<Catalog> selectCatalogOrdersByName(CatalogQueryDTO catalogQueryDTO);
}
